<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
	<link rel="stylesheet" href="<%=basePath%>statics/css/bootstrap-2.3.css">
	<title>山西旅游网站</title>
</head>
<body onLoad="checksession();" style="background-image:url('<%=basePath%>statics/images/main.png');background-size:100% 100%;">
<div class="container-fluid" >
	<div class="row-fluid">
		<div class="span12">
			<div class="row-fluid">
				<div class="span12">
					<div class="span4"></div>
					<div class="span4">
						<h3>华夏古文明-山西好风光</h3>
					</div>
					<div class="span4"></div>
				</div>
			</div>
			<div class="row-fluid">
				<div class="span2">
				</div>
				<div class="span8">
					<div class="navbar">
						<div class="navbar-inner">
							<div class="container-fluid">
								<a data-target=".navbar-responsive-collapse" data-toggle="collapse" class="btn btn-navbar"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a> <a href="<%=basePath%>front/index.jsp" class="brand">山西旅游网</a>
								<div class="nav-collapse collapse navbar-responsive-collapse">
									<ul class="nav">
										<li class="active">
											<a href="<%=basePath%>front/index.jsp">主页</a>
										</li>
										<li class="dropdown">
											<a data-toggle="dropdown" class="dropdown-toggle" href="#">大好山西<strong class="caret"></strong></a>
											<ul class="dropdown-menu" id="citylistid">

											</ul>
										</li>
										<li class="dropdown">
											<a data-toggle="dropdown" class="dropdown-toggle" href="#">主要景点<strong class="caret"></strong></a>
											<ul class="dropdown-menu" id="infolistid">

											</ul>
										</li>
										<li class="dropdown">
											<a data-toggle="dropdown" class="dropdown-toggle" href="#">山水旅游<strong class="caret"></strong></a>
											<ul class="dropdown-menu" id="categorylistid">
											</ul>
										</li>
										<li>
										</li>
										<li>
											<a href="picture.jsp">读图之美</a>
										</li>
										<li>
											<a href="twork.jsp">意见与建议</a>
										</li>
									</ul>
									<ul class="nav pull-right">
										<li><a href="user_login.jsp" id="login">游客登录</a></li>
										<li><a href="user_regedit.jsp" id="regedit">游客注册</a></li>
										<li><a href="<%=basePath%>api/user/logout" id="logout"></a></li>
									</ul>
								</div>

							</div>

						</div>
						<div class="carousel slide" id="carousel-339691" data-ride="carousel">
							<ol class="carousel-indicators">
								<li class="active" data-slide-to="0" data-target="#carousel-339691"></li>
								<li data-slide-to="1" data-target="#carousel-339691"></li>
								<li data-slide-to="2" data-target="#carousel-339691"></li>
								<li data-slide-to="3" data-target="#carousel-339691"></li>
								<li data-slide-to="4" data-target="#carousel-339691"></li>
							</ol>
							<div class="carousel-inner">
								<div class="item active">
									<img alt="" src="<%=basePath%>statics/images/inimg1da.jpg" />
									<div class="carousel-caption">
										<h4>偏关老牛湾</h4>
										<p>长城与黄河第一次握手的地方在哪里？在老牛湾，老牛湾在哪里？在山西西边的偏关县。黄河在此舞出近乎360度的华丽回旋，为中国最美的十大峡谷之一，河谷两岸壁立千仞，河道碧波万顷，河岸之上长城耸立，烽火台台台相望。</p>
									</div>
								</div>
								<div class="item">
									<img alt="" src="<%=basePath%>statics/images/inimg2da.jpg" />
									<div class="carousel-caption">
										<h4>平遥古城</h4>
										<p>
											山西平遥被称为“保存最为完好的四大古城”之一，也是中国仅有的以整座古城申报世界文化遗产获得成功的两座古城市之一。[1-2]
										</p>
									</div>
								</div>
								<div class="item">
									<img alt="" src="<%=basePath%>statics/images/inimg3da.jpg" />
									<div class="carousel-caption">
										<h4>悬空寺</h4>
										<p>
											享誉世界的埃菲尔铁塔高300米，以4个重达2500吨的水泥塔墩依托而起。一个建筑没有地基会怎么样？悬在空中可以吗？埃菲尔铁塔不可以，但悬空寺却可以。
										</p>
									</div>
								</div>
								<div class="item">
									<img alt="" src="<%=basePath%>statics/images/inimg4da.jpg" />
									<div class="carousel-caption">
										<h4>五台山</h4>
										<p>
											在中国历史上著名的“康乾盛世”有一个能让三位帝王亲临的圣地——五台山。五台山有当今世界上仅存的音乐绝响梵乐，并存有各类佛教建筑，大量庙堂殿宇构成了世界现存最庞大的佛教古建群，享有“佛国”盛誉，是中国最早、最大的国际性佛教道场。
										</p>
									</div>
								</div>
								<div class="item">
									<img alt="" src="<%=basePath%>statics/images/inimg5da.jpg" />
									<div class="carousel-caption">
										<h4>壶口瀑布</h4>
										<p>
											世界第一大黄色瀑布---山西壶口瀑布。黄河在此由河宽300米收窄为50米，飞流直下，骇浪翻滚，如千军万马奔腾怒吼，声传数十里外，其排山倒海的雄壮之势，素有“不观壶口大瀑布，难识黄河真面目”的盛誉。
										</p>
									</div>
								</div>
							</div>
							<a data-slide="prev" href="#carousel-339691" class="left carousel-control">‹</a>
							<a data-slide="next" href="#carousel-339691" class="right carousel-control">›</a>
						</div>
					</div>

				</div>
				<div class="span1">
				</div>
			</div>

			<div class="row-fluid">
				<div class="span2">
				</div>
				<div class="span6">
					<center>
						Copyright 2018 Inc.All rights reserved. 旅游网 版权所有 晋ICP备xxxxx号-1
					</center>
				</div>
				<div class="span4">
				</div>
			</div>
		</div>
	</div>
</div>
</body>
</html>

<script src="<%=basePath%>statics/libs/jquery.min.js"></script>
<script src="<%=basePath%>statics/libs/vue.min.js"></script>
<script src="<%=basePath%>statics/libs/router.js"></script>
<script src="<%=basePath%>statics/libs/bootstrap.min.js"></script>
<script src="<%=basePath%>statics/plugins/layer/layer.js"></script>
<script>
    //首页轮播图时间
    $(function(){
        $('#carousel-339691').carousel({
            interval: 3000
        });
    });
    //主要菜单-城市菜单
    $.ajax({
        url : "<%=basePath%>api/tcity/list",
        data : "",
        success : function(data) {
            var json=JSON.parse(data).cityList;
            $.each(json, function(index, item) {
                var a='<li><a href="<%=basePath%>api/tcity/info?id='+item.id+'">'+item.cityName+'</a></li>';
                $("#citylistid").append(a);
            });
        }
    });
    //主要菜单-山水旅游菜单
    $.ajax({
        url : "<%=basePath%>api/category/list",
        data : "",
        success : function(data) {
            var json=JSON.parse(data).categoryList;
            $.each(json, function(index, item) {
                var a='<li><a href="<%=basePath%>api/category/info?id='+item.id+'">'+item.name+'</a></li>';
                $("#categorylistid").append(a);
            });
        }
    });
    //主要菜单-景点导航
    $.ajax({
        url : "<%=basePath%>api/info/list",
        data : "",
        success : function(data) {
            var InfoList=JSON.parse(data).InfoList;
            var length=InfoList.length;
            for(var i=length-1;i>length-6;i--){
                var html='<li><a href="<%=basePath%>api/info/info?id='+InfoList[i].id+'">'+InfoList[i].tourName+'</a></li>';
                $('#infolistid').append(html)
            }
            var html='<li><a href="#">更多景点</a></li>';
            $('#infolistid').append(html)
        }
    });
    function checksession()
    {
        var strSession = '<%=session.getAttribute("user_login")%>';
        if( strSession !='null')
        {
            document.getElementById("regedit").innerText = "";
            document.getElementById("login").innerText = "";
            document.getElementById("logout").innerText = "注销";
        }
    }
</script>
